package cn.macswelle.campusecurity.feignapi.deviceManager;

import cn.macswelle.campusecurity.common.dto.requestDto.FaceRegDto;
import cn.macswelle.campusecurity.common.dto.requestDto.RecordDto;
import cn.macswelle.campusecurity.common.dto.responseDto.LocationDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "data-process", path = "/data")
public interface RecordApi {
  @RequestMapping(value = "/savePersonnel", method = RequestMethod.POST)
  String savePersonnel(@RequestParam("category") int category, @RequestParam("name") String name,
                       @RequestParam("description") String description);

  @RequestMapping(value = "/addRecord", method = RequestMethod.POST)
  String saveRecord(@RequestBody RecordDto dto);

  @RequestMapping(value = "/registerFace", method = RequestMethod.POST)
  String register(@RequestBody FaceRegDto dto);

    @RequestMapping(value = "/registerFace", method = RequestMethod.POST)
    List<LocationDto> findPersonnel(String personnelId);
}
